home *** CD-ROM | disk | FTP | other *** search
- CHIP add IFX780_84
-
- PIN a[0:7] ; 8-bit a input
- PIN b[0:7] ; 8-bit b input
- PIN sum[0:7] ; 8-bit sum of a+b
- PIN cry[1:7] ; 7 bits of carry info
- PIN 47 clk ; shift-reg clock
- PIN 48 shift ; shift-reg enable
- PIN 49 in ; shift-reg input
- PIN 50 unused1 ; unused pins that are
- PIN 51 unused2 ; connected to the PC
- PIN 77 unused3 ; printer port so we
- PIN 78 unused4 ; make sure they are
- ; not used elsewhere
- EQUATIONS
-
- ; this builds two concatenated 8-bit
- ; shift registers which shift only
- ; when shift is high
- a0 := in
- a[7:1] := a[6:0]
- b0 := a7
- b[7:1] := b[6:0]
- a[7:0].ACLK = clk * shift
- b[7:0].ACLK = clk * shift
-
- ; these are the equations for an 8-bit
- ; ripple-carry adder
- sum0 = a0 :+: b0
- sum[7:1] = a[7:1] :+: b[7:1] :+: cry[7:1]
- cry1 = a0 * b0
- cry[7:2] = a[6:1] * b[6:1] +
- a[6:1] * cry[6:1] +
- b[6:1] * cry[6:1]
-